Field of the Invention
The present invention relates to an image processing apparatus, and more particularly to a technique to correct a depth map.
Description of the Related Art
A technique to estimate distance using a plurality of captured images based on a stereo method, a depth from defocus (DFD) method, a depth from focus (DFF) method or the like and generate a depth map (also referred to as distance image) has been proposed. The stereo method is a technique to calculate a depth (also referred to as distance) based on a plurality of images photographed from different viewpoints. The DFD method and the DFF method are technique to calculate a distance based on a plurality of images of which photographing parameters are different. Distance images generated by these technique include errors, which lead to deterioration of quality of application that uses the depth maps.
To solve this problem, Patent Literature 1 proposes a technique to correct the depth map. In Patent Literature 1, clustering processing is performed on at least one of the pixel values and the distance values of an image, and a representative distance value in the created-cluster is generated. Then distances are corrected by replacing the distances of the correction target pixels with the representative value of the cluster corresponding to the correction target pixels.
To more accurately determine a distance for each object, Patent Literature 2 proposes a method to detect an object included in the image, and to estimate a distance of the object in the image using a model having distance information.    Patent Literature 1: Japanese Patent Application Publication No. 2012-078942    Patent Literature 2: Japanese Patent Application Publication No. 2012-b 103135